package routes

import (
	"game-server/app/controllers/admin"
	"game-server/app/middleware"
	"game-server/app/services"

	"github.com/gin-gonic/gin"
)

func SetVpnGroupRoutes(router *gin.RouterGroup) {
	frontRouter := router.Group("/front")
	{
		//分页条件查询
		frontRouter.POST("/vpn/list", admin.VpnListFront)
	}

	adminRouter := router.Group("/admin").Use(middleware.JWTAuth(services.AdminGuardName))
	{
		//新增
		adminRouter.POST("/vpn/add", admin.VpnAdd)
		//编辑
		adminRouter.POST("/vpn/edit", admin.VpnEdit)
		//删除
		adminRouter.POST("/vpn/delete", admin.VpnDelete)
		//根据id获取
		adminRouter.POST("/vpn/get", admin.VpnGet)
		//分页条件查询
		adminRouter.POST("/vpn/list", admin.VpnList)
	}
}
